home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 5
/
Aminet 5 - March 1995.iso
/
Aminet
/
util
/
batch
/
Notify10.lha
/
Notify
/
Notify.doc
< prev
next >
Wrap
Text File
|
1994-12-19
|
2KB
|
101 lines
Notify 1.00
=============
Copyright © 1994 by
Marc 'Nepomuk' Heuler <marc@aargh.incubus.sub.org>
DISTRIBUTION
~~~~~~~~~~~~
Only non-commercial distribution allowed.
This package is MAILWARE. If you use it, send an email to me.
USAGE
~~~~~
Notify is a shell-only program. It accepts those parameters:
NAME/A Name of the directory or file that is to be monitored.
COMMAND Command to execute when a change has been detected.
DELAY/N/K Time in seconds to pass without further changes happening
before starting COMMAND is allowed.
STAY/S Stay in memory after COMMAND is executed and coninue
monitoring.
HINTS
~~~~~
For the purpose of consistency Notify does not pass-through the COMMAND's
returncode.
Notify is halted while COMMAND executes (however it does not miss changes
in STAY mode). Use COMMAND="Run foo" to work around this behaviour.
As of Kickstart v40.38 and Workbench v40.23 append mode output redirection
on existing files unfortunately does not trigger notification (at least in
RAM:). Same applies for deletion of files.
To stop a STAY-mode Notify from remote, use: Break `Status COM=Notify`
EXAMPLES
~~~~~~~~
#1 Run Notify RAM: COMMAND="Echo *"Notification happened!*""
Echo >RAM:File "Test"
#2 Run Notify DOWNLOAD: COMMAND="RX TestNewArchives.rexx" DELAY=120 STAY
#3 (for CacheFont by Adam Dawes)
Run Notify FONTS: COMMAND="MakeFontList" DELAY=120 STAY
#4 (a small network printer dispatcher)
(because SKIP BACK doesn't work after EXECUTE, this script has)
(to be saved as "PRINTERDISPATCHER" in the path, s-bit set)
(this script requires locale setting English)
.KEY DIRECTORY/A,PRINTER/A
.BRA {
.KET }
Lab Loop
List >T:Print.{$$} "{DIRECTORY}"
If `List T:Print.{$$} LFORMAT="%l"` EQ "empty"
Notify "{DIRECTORY}"
EndIf
Wait 120
List >T:Print.{$$} "{DIRECTORY}" ALL FILES LFORMAT="Type >"{PRINTER}" *"%s%s*"*NDelete >Nil: *"%s%s*""
Execute T:Print.{$$}
Delete >Nil: T:Print.{$$}
Run >Nil: <Nil: PrinterDispatcher "{DIRECTORY}" "{PRINTER}"
AUTHOR
~~~~~~
Marc 'Nepomuk' Heuler
Stephanstr. 6
97070 Wuerzburg
Germany
+49 931-53295
marc@aargh.incubus.sub.org
This package is MAILWARE. If you use it, send an email to me.